home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue.arc / TVMEM.C < prev    next >
C/C++ Source or Header  |  1990-01-09  |  1KB  |  41 lines

  1. /*=======================================================*/
  2. /*  TVMEM.C                                              */
  3. /*     functions to allocate and deallocate TV memory    */
  4. /*                                                       */
  5. /*  (c) Copyright 1988 Ralf Brown  All Rights Reserved   */
  6. /*  May be freely copied for noncommercial use, so long  */
  7. /*  as this copyright notice remains intact, and any     */
  8. /*  changes are marked in the comment blocks preceding   */
  9. /*  functions.                                           */
  10. /*=======================================================*/
  11.  
  12. #include "tvapi.h"
  13.  
  14. /*======================================================*/
  15. /* TVgetmem--allocate a block of "system" memory        */
  16. /*   Ralf Brown 4/2/88                                  */
  17. /*======================================================*/
  18.  
  19. void far * pascal TVgetmem(unsigned amt)
  20. {
  21.    _BX = amt ;
  22.    _AX = 0x1001 ;
  23.    geninterrupt(0x15) ;
  24.    return MK_FP(_ES,_DI) ;
  25. }
  26.  
  27.  
  28. /*======================================================*/
  29. /* TVputmem--free a block of "system" memory            */
  30. /*   Ralf Brown 4/2/88                                  */
  31. /*======================================================*/
  32.  
  33. void pascal TVputmem(void far *block)
  34. {
  35.    _ES = FP_SEG(block) ;
  36.    _DI = FP_OFF(block) ;
  37.    _AX = 0x1002 ;
  38.    geninterrupt(0x15) ;
  39. }
  40.  
  41.